package com.imooc.controller;

import com.imooc.service.UserService;
import com.imooc.utils.IMoocJSONResult;
import com.imooc.utils.ImageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api")
public class ContactController {

    @Autowired
    private UserService userService;

    @PostMapping("/getContact")
    public IMoocJSONResult getContact(Integer userId){

        System.out.println(userId);

        return IMoocJSONResult.ok(userService.getAlllContact(userId));

    }
}
